﻿@{
}
@model IEnumerable<OnlineStore.Models.Product>


<div class="container">
    <div class="row">
        <table class="table">
                <tr>
                    <th>书名：</th>
                    <th>作者：</th>
                    <th>出版社：</th>
                    <th>类别：</th>
                    <th>ISBN：</th>
                    <th>操作</th>
                </tr>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>@item.Name</td>
                        <td>@item.Author</td>
                        <td>@item.Publisher</td>
                        <td>@item.Type</td>
                        <td>@item.Isbn</td>
                        <td>
                            <a asp-action="Details" asp-route-id="@item.Id" class="btn btn-outline-primary">详情</a>
                            <a asp-action="Update" asp-route-id="@item.Id" class="btn btn-outline-info">修改</a>
                            <a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-outline-danger">删除</a>
                        </td>
                    </tr>
                }
            </table>
    </div>
    <div class="row mt-2">
        <a asp-action="Add" class="btn btn-outline-primary">上架新的产品</a>
    </div>
</div>

